﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;


namespace Motoball.screenmanager
{
    public abstract class GameScreen
    {
        public static ScreenManager screenManager;
        

        string screenName;
        
        public GameScreen(string screenName)
        {
            
            this.screenName = screenName;

        }
        
        #region Methods
        public virtual void SetToActive() { }
        abstract public void LoadContent();
        abstract public void Draw(GameTime gameTime);
        public virtual void Update(GameTime gameTime) 
        { }
        /// <summary>
        /// remove this screen from the screenManager-list
        /// </summary>
        protected virtual void Exit()
        {
            screenManager.RemoveScreen(this);
            screenManager.ToPreviousMenu();
        }
        public virtual void Reset() { }
        public virtual void Initialize() { }
        #endregion

        #region Properties
        private ContentManager Content
        {
            get { return screenManager.Content; }
        }
        public string ScreenName
        {
            get { return screenName; }
        }
       
        public SpriteBatch SpriteBatch
        {
            get { return screenManager.SpriteBatch; }
        }
        
        public static Camera Camera
        {
            get { return Motoball.camera; }
        }
        #endregion

    }
}
